package cn.gene.timeyan.privateletter.webapi.mapper;


import cn.gene.timeyan.pojo.PrivateLetter.NoticeMessage;
import cn.gene.timeyan.pojo.PrivateLetter.PrivateLetter;
import cn.gene.timeyan.pojo.PrivateLetter.Vo.PrivateLetterSenderIdVo;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 私信
 */
@Repository
public interface PrivateLetterMapper {

     /**
      * 新增私信
      * @param privateLetter
      * @return 受影响行数
      */
     int insert(PrivateLetter privateLetter);

     /**
      * 新增公告/通知
      * @param noticeMessage
      * @return
      */
     int insertNoticeMessage(NoticeMessage noticeMessage);

     /**
      * 删除私信
      * @param privateLetterId
      * @return
      */
     int deleteById(Long privateLetterId);



     /**
      * 用id查询私信
      * @param privateLetterId
      * @return
      */
     PrivateLetter getPrivateLetterById(Long privateLetterId);

     /**
      * 查询所有公告/通知
      * @return
      */
     List<NoticeMessage> getAllNoticeMessage(Long receiverId);


     /**
      * 用用户查询谁给你发私信
      * @param receiverId
      * @return
      */
     List<PrivateLetterSenderIdVo> getSenderByReceiverId(Long receiverId );


     /**
      *
      * @param receiverId
      * @param SenderId
      * @return
      */
     List<PrivateLetter>getContent(Long receiverId , Long SenderId);
}
